package cn.kgc.service.impl;

import cn.kgc.entity.Categroy;
import cn.kgc.mapper.CategroyMapper;
import cn.kgc.service.CategroyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class CategroyServiceImpl implements CategroyService {
    @Resource
    private CategroyMapper categroyMapper;
    @Override
    public List<Categroy> getAllCategroy() {
        return categroyMapper.getAllCategroy();
    }

    @Override
    public Categroy getCategroyById(Integer id) {
        return categroyMapper.getCategroyById(id);
    }

    @Override
    public void addCategroy(Categroy categroy) {
        categroyMapper.addCategroy(categroy);
    }

    @Override
    public void updateCategroy(Categroy categroy) {
        categroyMapper.updateCategroy(categroy);
    }

    @Override
    public void deleteCategroyById(Integer id) {
        categroyMapper.deleteCategroyById(id);
    }
}
